package com.example.demo.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.demo.entity.Hanlan;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * (Hanlan)表数据库访问层
 *
 * @author makejava
 * @since 2023-11-19 18:48:09
 */
@Mapper
public interface HanlanMapper extends BaseMapper<Hanlan> {
    List<Hanlan> selectAll();
    @Select("SELECT * FROM hanlan WHERE name = #{name}")
    Hanlan selectByName(@Param("name") String name);
    @Select("SELECT * FROM hanlan WHERE category = #{category}")
    List<Hanlan> getByCategory(@Param("category") Long category);
}
